import java.util.Scanner;
public class java3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个字符串：");
        String str1 = scanner.nextLine();
        System.out.println("请输入第二个字符串：");
        String str2 = scanner.nextLine();
        if (str1.equals(str2)) {
            System.out.println("两个字符串相同");
        } else {
            System.out.println("两个字符串不同");
        }
        scanner.close();
    }
}
